﻿
layui.config({
    base: "/js/"
}).use(['form', 'layer'], function () {

    //获取layer的from对象、父元素的layer对象和jquery对象
    var form = layui.form,
        $ = layui.jquery,
        layer = layui.layer;

    $("#loginBtn").click(function () {
        $.post(
            '/Login/LoginCheck',
            {
                //获取账号和密码
                usernumber: $('#usernumber').val(),
                password: $('#password').val(),
            },
            function (result) {
                //在调试版上显示信息
                console.log(result);
                //弹出提示信息
                layer.msg(result);
                if (result == '登录成功，正在跳转页面！') {
                    window.location.href = "/Home/Index1";
                }
            }
        )
    });

})
